The present invention relates to network communications and more particularly, to testing an aging function in a network switch.
In computer networks, a plurality of network stations are interconnected via a communications medium. For example, Ethernet is a commonly used local area network scheme in which multiple stations are connected to a single shared serial data path. These stations often communicate with a switch located between the shared data path and the stations connected to that path. Typically, the switch controls the communication of data packets on the network.
The network switch includes switching logic for receiving and forwarding frames to the appropriate destinations. When all of the stations connected to the network are simultaneously operating, packet traffic on the shared serial path can be heavy with little time between packets.
One arrangement for generating a frame forwarding decision uses a direct addressing scheme, where the network switch includes a fixed address table storing switching logic for the destination addresses. For example, a frame may be received by the network switch with header information indicating the source address and destination address of the frame. The switching logic then uses the source address and destination address to search the address table to find the appropriate frame forwarding information. The switch then uses this information and sends the frame to the appropriate port(s).
Such prior art arrangements typically make additions to the network difficult to implement. In addition, such arrangements often cannot delete or invalidate a station from the address table when the station is quiet, i.e., not transmitting data for a given period of time. This difficulty in deleting stations from the address table may increase the latency of the switch by increasing the time spent searching non-active station entries in the address table for frame forwarding information.
There exists a need for a switching device that includes an xe2x80x9cagingxe2x80x9d function to invalidate address entries in an address table in a network switch and also includes a test mode for testing the aging function.
There is also a need for a method of testing an aging function in a network switch in an efficient manner.
These and other needs are met by the present invention, where a multiport switch includes an address table that stores address entries used by an internal decision making engine to make frame forwarding decisions. The internal decision making engine includes an aging function whereby entries are xe2x80x9cagedxe2x80x9d and invalidated based on information stored in the address table. The invalidated entries can then be overwritten. The multiport switch also includes a test mode whereby the aging function can be tested in a relatively quick manner by an external test device to ensure that the aging function is operating properly.
According to one aspect of the invention, a network switch is configured for controlling the communication of data frames between stations. The switch includes a table for storing address information as address entries in a plurality of bins with the address entries containing an address hit field and an aging override field. The switch also includes a programmable register configured to receive a test mode activation signal from an external test device and a control device configured to operate in a test mode based on the contents of the programmable register. The control device, when operating in the test mode, is configured to poll the address entries every predetermined period of time based on a timer value and determine whether to invalidate an address entry based on the contents of the address hit field and the aging override field. The control device is further configured to invalidate an address entry and rearrange the respective bin, based on the contents of the address hit field and aging override field.
Another aspect of the present invention provides a method for testing an aging function in a multiport switch that controls communication of data frames between stations. The method includes storing address entries in the address table with the address entries including an address hit field and an aging override field. The method also includes transmitting a test mode activation signal to a decision making engine located on the multiport switch and polling the address entries every predetermined period of time. The method further includes determining whether to invalidate an address entry based on the contents of the address hit field and the aging override field, invalidating an address entry and rearranging a particular bin, based on the determining step. The method also includes reading the contents of the address table to determine if the aging function operated properly.
Other advantages and features of the present invention will become readily apparent to those skilled in this art from the following detailed description. The embodiments shown and described provide illustration of the best mode contemplated for carrying out the invention. The invention is capable of modifications in various obvious respects, all without departing from the invention. Accordingly, the drawings are to be regarded as illustrative in nature, and not as restrictive.